package com.yiba.vpn.authorization.manager;

import java.util.concurrent.TimeUnit;

/**
 * 对Token进行操作的接口
 * @author ScienJus
 * @date 2015/7/31.
 */
public interface TokenManager {



    public void deleteKey(String key);


    public void addValue(String key,String Value,long time,TimeUnit seconds);

    public void addV(String key,String Value,long time,TimeUnit seconds);

    public void expireValue(String key, long time, TimeUnit timeUnit);


    public String getValue(String key);

    /**
     * 是否过期
     * @param key
     * @return
     */
    public Long ttlKey(String key);


    public long getExpireTimeType(String key);

    public Long incr(String key, long liveTime) ;

    public Long getInValue(String key);


}
